package com.ruoyi.shop.domain;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.springframework.validation.annotation.Validated;

import javax.validation.Valid;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Size;

/**
 * 收货地址对象 shop_user_address
 * 
 * @author Alan Zhang
 * @date 2021-09-12
 */
public class ShopUserAddress extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 收货地址ID */
    private Long id;

    /** 用户ID */
    @Excel(name = "用户ID")
    private Long userId;

    /** 姓名 */
    @NotEmpty
    @Size(min=2,max=8)
    @Excel(name = "姓名")
    private String username;

    /** 手机号 */
    @NotEmpty
    @Size(max=11)
    @Excel(name = "手机号")
    private String mobile;

    /** 省 */
    @NotEmpty
    @Excel(name = "省")
    private String province;

    /** 市 */
    @NotEmpty
    @Excel(name = "市")
    private String city;

    /** 区（县） */
    @NotEmpty
    @Excel(name = "区（县）")
    private String district;

    /** 详细地址到门牌号 */
    @NotEmpty
    @Excel(name = "详细地址")
    private String detail;

    /** 邮政编码 */
    @Excel(name = "邮政编码")
    private String zipcode;

    /** 是否默认,1是，0否 */
    @Excel(name = "是否默认",readConverterExp = "1=是,0=否")
    private Integer widthDefault;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setUserId(Long userId) 
    {
        this.userId = userId;
    }

    public Long getUserId() 
    {
        return userId;
    }
    public void setUsername(String username) 
    {
        this.username = username;
    }

    public String getUsername() 
    {
        return username;
    }
    public void setMobile(String mobile) 
    {
        this.mobile = mobile;
    }

    public String getMobile() 
    {
        return mobile;
    }
    public void setProvince(String province) 
    {
        this.province = province;
    }

    public String getProvince() 
    {
        return province;
    }
    public void setCity(String city) 
    {
        this.city = city;
    }

    public String getCity() 
    {
        return city;
    }
    public void setDistrict(String district) 
    {
        this.district = district;
    }

    public String getDistrict() 
    {
        return district;
    }
    public void setDetail(String detail) 
    {
        this.detail = detail;
    }

    public String getDetail() 
    {
        return detail;
    }
    public void setZipcode(String zipcode) 
    {
        this.zipcode = zipcode;
    }

    public String getZipcode() 
    {
        return zipcode;
    }
    public void setWidthDefault(Integer widthDefault) 
    {
        this.widthDefault = widthDefault;
    }

    public Integer getWidthDefault() 
    {
        return widthDefault;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("userId", getUserId())
            .append("username", getUsername())
            .append("mobile", getMobile())
            .append("province", getProvince())
            .append("city", getCity())
            .append("district", getDistrict())
            .append("detail", getDetail())
            .append("zipcode", getZipcode())
            .append("widthDefault", getWidthDefault())
            .append("updateTime", getUpdateTime())
            .append("createTime", getCreateTime())
            .toString();
    }
}
